package javamobile.model;

import org.mybeans.dao.DAOException;

public class Model {
	private DAOFactory  factory;

	public Model() {
		try{
		String jdbcDriver = "com.mysql.jdbc.Driver";
		String jdbcURL    = "jdbc:mysql:///teamftw";
	
		factory  = new DAOFactory(jdbcDriver,jdbcURL);
		} catch (DAOException e) {
	        System.err.println("Could not connect to database."); 
			e.printStackTrace();
	        System.exit(-1); 
		}
	}
	
	public DAOFactory  getDAOFactory()  { return factory;  }
}

